import java.util.Scanner;

public class Demo10 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入字符串:");
        String st=sc.nextLine();
        char[] ch=st.toCharArray();
        int big=0;
        int small=0;
        int num=0;
        int other=0;
        for (int i = 0; i < ch.length; i++) {
            char c=ch[i];
            if(c>='A'&&c<='Z'){
                big++;
            }else if(c>='a'&&c<='z'){
                small++;
            }else if(c>='0'&c<='9'){
                num++;
            }else{
                other++;
            }
        }
        System.out.println("----------------统计各种字母字符的个数---------------");
        System.out.println("大写字母字符的个数:"+big);
        System.out.println("小写字母字符的个数:"+small);
        System.out.println("数字字母字符的个数:"+num);
        System.out.println("其他字母字符的个数:"+other);
    }
}
